Developer Documentation

QuickTime 4 API Documentation

QuickTime for Java

| Previous | Chapter Top | Chapter Contents | Next |

QuickTime for Java Presenters

When QuickTime plays back a movie, it does not generally read all of its media data into memory but rather reads chunks of data as required. A movie can be constructed that requires the media data to be loaded into memory or other parameters that will require more memory to be used but will generally improve the quality of the rendered movie. The QuickTime API documentation covers these customizations that a movie's author can make.

Due to the usefulness of, and in some cases requirement for, loading media data into memory, QuickTime for Java provides presenters. A presenter is an object that renders media data that is loaded or resides in memory. A presenter also uses a QuickTime service to render this media data.

QuickTime for Java ships with an ImagePresenter for rendering image data. The ImagePresenter class implements the QTDrawable interface. The ImagePresenter uses a DSequence to perform the rendering of the image data. It is the primary object that is used in QuickTime for Java to render image data. The TwoDSprite is also a presenter that presents image data loaded into memory. However, its role is specific to the membership of its Sprite in a SpriteWorld (which is represented in QuickTime for Java by the SWCompositor ).

Though only an ImagePresenter is provided in this release, a similar design strategy could be employed with other media types. For example, let's consider the music media type. MusicMedia is rendered in QuickTime by the TunePlayer class. A MusicPresenter class could be created that used the TunePlayer to render the MusicData . A MusicSpec interface could be described that returns a MusicDescription and the raw MusicData of the tune events.

The ImagePresenter Class

Subclasses of ImagePresenter


© 1999 Apple Computer, Inc.

| Previous | Chapter Top | Chapter Contents | Next |